package com.ny.wlw;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int money=100;
        System.out.println("你消费的金额是"+money);
        System.out.println("请选择支付方式：1.银行卡 2.微信 3.支付宝");
        Scanner scanner=new Scanner(System.in);
        switch (scanner.nextInt()){
            case 1:
                Pay bankpay=new Bankpay();
                bankpay.pay(money);
                break;
            case 2:
                Pay wechatpay=new Wechatpay();
                wechatpay.pay(money);
                System.out.println("扣款的是微信;");
                break;
            case 3:
                Pay alipay=new Alipay();
                alipay.pay(money);
                System.out.println("扣款的是支付宝;");
                break;
        }
    }
}
